package com.wuxiaofan.auth.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wuxiaofan.auth.entity.OauthClientDetails;
import com.wuxiaofan.auth.entity.custom.OauthClientDetailsCustom;
import com.wuxiaofan.auth.mapper.OauthClientDetailsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;

@Service
public class OauthClientDetailsService {
    @Autowired
    private OauthClientDetailsMapper oauthClientDetailsMapper;
    public OauthClientDetails findById(String id){
        return oauthClientDetailsMapper.selectById(id);
    }

    public OauthClientDetails findByClientId(String clientId){
        return oauthClientDetailsMapper.selectByClientId(clientId);
    }

    public OauthClientDetailsCustom findCountByMap(Map paraMap){
        return oauthClientDetailsMapper.findCountByMap(paraMap);
    }

    public OauthClientDetailsCustom findGroupByMap(Map paraMap){
        return oauthClientDetailsMapper.findGroupByMap(paraMap);
    }

    public List<OauthClientDetailsCustom> findByMap(Map paraMap){
        return oauthClientDetailsMapper.findByMap(paraMap);
    }

    public Page<OauthClientDetailsCustom> findByMap(Map paraMap, Page page){
        return page.setRecords(oauthClientDetailsMapper.findByMap(paraMap,page));
    }


    public void updateMapById(Map paraMap){
        oauthClientDetailsMapper.updateMapById(paraMap);
    }
    public void delById(String id){
        oauthClientDetailsMapper.deleteById(id);
    }

}
